package com.niuwa.p2p.dao.fund;

import java.util.List;
import java.util.Map;

import com.niuwa.p2p.dao.MyBatisDao;
import com.niuwa.p2p.entity.fund.AccountFlow;

@MyBatisDao
public interface AccountFlowDao {
	
	
	public int insertSelective(AccountFlow accountFlow);

	/**
	 * 
	 * 通过条件查询牛娃资金流水条数
	 * 
	 * @param paramMap
	 * @returnInteger
	 *
	 */
	public Integer getNwAccountFlowCountByCondition(Map<String, Object> paramMap);


	/**
	 * 
	 * 通过条件查询牛娃资金流水条数
	 * 
	 * @param paramMap
	 * @returnInteger
	 *
	 */
	public List<AccountFlow> getNwAccountFlowByCondition(Map<String, Object> paramMap);


	/**
	 * 
	 * 通过账户号牛娃资金流水
	 * 
	 * @param paramMap
	 * @returnInteger
	 *
	 */
	public List<AccountFlow> searchAccountflowByAcctNo(Map<String, Object> paramMap);


	/**
	 * 
	 * 通过账户号资金流水条数
	 * 
	 * @param acctNo
	 * @return
	 *
	 */
	public Integer searchAccountflowCountByAcctNo(Map<String, Object> paramMap);


	/**
	 * 
	 * 通过条件查询客户资金记录条数
	 * 
	 * @param paramMap
	 * @return int
	 *
	 */
	public int getAccountFundRecordCountByCondition(Map<String, Object> paramMap);


	/**
	 * 
	 * 通过条件查询客户资金记录[web]
	 * 
	 * @param paramMap
	 * @return List<AccountFlow>
	 *
	 */
	public List<AccountFlow> searchAccountFundRecordByCondition(Map<String, Object> paramMap);


	/**
	 * 通过条件查询牛娃资金流水条数【web】
	 * 
	 * @param paramMap
	 * @return List<AccountFlow>
	 *
	 */
	public List<AccountFlow> getNwAccountFlowByConditionListPage(Map<String, Object> paramMap);


	/**
	 * 通过流水号获取投资记录详情
	 * 
	 * @param serialNo
	 * @return
	 */
	public AccountFlow selectAccountFlowDetail(Map<String, Object> paramMap);
	
	/**
	 * 根据投资记录编号查询流水
	 * @param paramMap
	 * @return
	 */
	public AccountFlow selectAccountFlowByRecordNo(String recordNo);
	
	/**
	 * 查询区间时间内交易总额 
	 * @param paramMap
	 * @return
	 */
	public Long getIntervalTimerAmountByCondition(Map<String, Object> paramMap);
	
	/**
	 * 通过流水号查询流水记录
	 */
	public AccountFlow selectByPrimaryKey(String serialNo);
	
	/**
	 * 根据请求号获取资金记录 
	 * @param reqNo
	 * @return
	 */
	public List<AccountFlow> selectAccountFlowByReqNo(String reqNo);
	
	int updateByPrimaryKeySelective(AccountFlow record);
}